package com.ipan.weixin.msg.send;

import com.ipan.weixin.msg.general.XmlMsg;

/**
 * 发送视频消息
 * 
 * @author iPan
 * @version 2013-12-25
 */
public class VideoSendMsg extends AbstractSendJsonMsg {

	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = 8176892098552780844L;
	
	private Video video;
	
	public VideoSendMsg(String touser, String media_id, String title, String description) {
		super(touser, XmlMsg.TYPE_VIDEO);
		setVideo(media_id, title, description);
	}
	
	public VideoSendMsg(String touser) {
		super(touser, XmlMsg.TYPE_VIDEO);
	}

	public VideoSendMsg() {
		super(XmlMsg.TYPE_VIDEO);
	}

	public Video getVideo() {
		return video;
	}

	public void setVideo(Video video) {
		this.video = video;
	}
	
	public void setVideo(String media_id, String title, String description) {
		this.video = new Video(media_id, title, description);
	}

	class Video {
		private String media_id;
		private String title;
		private String description;
		
		public Video() {}
		
		public Video(String media_id, String title, String description) {
			this.media_id = media_id;
			this.title = title;
			this.description = description;
		}
		
		public String getMedia_id() {
			return media_id;
		}
		
		public void setMedia_id(String media_id) {
			this.media_id = media_id;
		}
		
		public String getTitle() {
			return title;
		}
		
		public void setTitle(String title) {
			this.title = title;
		}
		
		public String getDescription() {
			return description;
		}
		
		public void setDescription(String description) {
			this.description = description;
		}
	}

//	public static void main(String[] args) {
//		VideoServiceMsg msg = new VideoServiceMsg("OPENID", "MEDIA_ID", "TITLE", "DESCRIPTION");
//		System.out.println(msg);
//	}

}

/*
发送：
{
    "touser":"OPENID",
    "msgtype":"video",
    "video":
    {
      "media_id":"MEDIA_ID",
      "title":"TITLE",
      "description":"DESCRIPTION"
    }
}
*/
